package ArithmeticObjects;
/**
 * @author Shir Peleg
 * This class represents a general Group that is used in the verificatum, 
 * Which means that has a marshel and unmarshel operations, as well as a generator 
 * and a random array of elements.
 */
import java.util.InputMismatchException;
import ArithUtils.Array;
import ArithUtils.BigNumber;
import ArithUtils.Func.P1;
import CryptoPrim.PRG;
import MathObjects.OperationStruct;
import Utils.ByteTree;

public abstract class ConvertableGroup<T> extends BTGroup<T> {

	public ConvertableGroup(OperationStruct<T> multOpp, BigNumber order,
			P1<ByteTree, T> toBT, P1<T, ByteTree> fromBT) {
		super(multOpp, order, toBT, fromBT);
	}
	/**
	 * @param N
	 * @param prg
	 * @param nr
	 * @return An Array of random Group Elements.
	 * @throws InputMismatchException
	 */
	public abstract Array<BTElement> randomArray(int N, PRG prg, int nr) throws InputMismatchException;
	
	/**
	 * @return The ByteTree representation of the Group.
	 */
	public abstract ByteTree getByteTreeRep();
	
	/**
	 * @return The Groups generator
	 */
	public abstract BTElement getGenerator();
}